import { createSlice } from "@reduxjs/toolkit";
const initialState = {
    loading: false
}
export const loading = createSlice({
    name: "loading",
    initialState,
    reducers: {
        Isloading: (state, actions) => {
            console.log(state,actions);
            if (actions.type) {
                state.loading = !state.loading
            }
            return state
        }
    }
})
const { actions, reducer } = loading
export const { Isloading } = actions
export default reducer